Xbasic

INET::Socket::ReadUntil Method

Syntax

Result_Flag as L = ReadUntil(Data BYREF as C, Delimiter as C [, ReturnDelimiter as L] [,Timeout as N [, ReleaseXbasic as L = .t.]])

Arguments

Result_Flag

TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).

Data

The data received from the connection.

Delimiter

The character that defines a logical segment of the data, such as a CR-LF that ends a line.

ReturnDelimiter

Indicates whether to include the Delimiter in the Data.

.T. (TRUE) = The returned string contains the delimiter.
.F. (FALSE) = The returned string does not contain the delimiter.
Timeout

The number of seconds before the method returns.

ReleaseXbasic

L = .t.

Description

The INET::Socket::ReadUntil() method reads from the input stream until the delimiter is encountered or a timeout occurs. If the function returns FALSE, there may still be data in the returned buffer. This means that the read timed-out before receiving the delimiter. If ReturnDelimiter is true, the delimiter is returned with the string.

See Also